from flask import Flask

def create_app():
    """应用工厂函数"""
    app = Flask(__name__)
    app.config['SECRET_KEY'] = 'dev-secret-key'
    
    # 注册蓝图
    from app.routes.main import main_bp
    app.register_blueprint(main_bp)
    
    return app